package io.renren.modules.weixin.dao;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import io.renren.modules.weixin.entity.StatisticsEntity;
import io.renren.modules.weixin.entity.ZbAdminEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ZbAdminDao extends BaseMapper<ZbAdminEntity> {

    void deleteByzbCodeAndcreator(@Param("zbCode") String zbCode, @Param("creator") String creator);

    List<ZbAdminEntity> selectByzbCode(String zbCode);

    List<ZbAdminEntity> selectBycreator(String creator);

    ZbAdminEntity selectByzbCodeAndcreator(@Param("zbCode") String zbCode, @Param("creator") String creator);

    void updateStatusOff(String creator);

    void updateStatusOn(String creator);

    void updateByzbCodeAndcreator(@Param("minValue") double minValue, @Param("maxValue") double maxValue, @Param("zbLevel") String zbLevel, @Param("remark") String remark, @Param("zbCode") String zbCode, @Param("creator") String creator);

    void updateOkByzbCodeAndcreater(@Param("ok") int ok, @Param("zbCode") String zbCode, @Param("creator") String creator);

    void updateErrorByzbCodeAndcreater(@Param("error") int error, @Param("zbCode") String zbCode, @Param("creator") String creator);

    void updateAlertByzbCodeAndcreater(@Param("alert") int alert, @Param("zbCode") String zbCode, @Param("creator") String creator);

    void updateWarningByzbCodeAndcreater(@Param("warning") int warning, @Param("zbCode") String zbCode, @Param("creator") String creator);

    void updateStatusOpen(@Param("zbCode") String zbCode, @Param("creator") String creator);

    void updateStatusClose(@Param("zbCode") String zbCode, @Param("creator") String creator);

    StatisticsEntity statisticsAdmin(String creator);

    List<ZbAdminEntity> selectList();
}
